<!-- inc:head -->
<script type="text/javascript" src="{func include_js list.js}"></script>
<script type="text/javascript">
$(document).ready(function(){
	top.$.desktop.title('{$rs.title}');
});
</script>
<!-- if $project_list -->
<script type="text/javascript">
function pendding_info()
{
	var url = get_url('index','pendding_sublist');
	$.ajax({
		'url':url,
		'cache':false,
		'async':true,
		'dataType':'json',
		'success': function(rs){
			if(rs.status == "ok")
			{
				var list = rs.content;
				var html = '<em class="toptip">{total}</em>';
				var total = 0;
				for(var key in list)
				{
					$("li[id=project_"+list[key]['id']+"] em").remove();
					$("li[id=project_"+list[key]['id']+"]").append(html.replace('{total}',list[key]['total']));
				}
				//每隔一分钟检测一次
				window.setTimeout("pendding_info()", 60000);
			}
			else
			{
				//移除提示
				$("em.toptip").remove();
				//每隔三分钟进行一次检测
				window.setTimeout("pendding_info()", 180000);
			}
		}
	});
}

$(document).ready(function(){
	pendding_info();
	$("#project li").mouseover(function(){
		$(this).addClass("hover");
	}).mouseout(function(){
		$(this).removeClass("hover");
	}).click(function(){
		var url = $(this).attr("href");
		if(url)
		{
			direct(url);
		}
		else
		{
			alert("未指定动作！");
			return false;
		}
	});
});
</script>
<div class="tips">
	<span class="red">{$rs.title}</span> 子项信息，请点击进入修改
</div>
<ul class="project" id="project">
	<!-- loop from=$project_list key=$key value=$value -->
	<li id="project_{$value.id}" title="{$value.title}" status="{$value.status}" href="{echo admin_url('list','action')}&id={$value.id}">
		<div class="project" href="{echo admin_url('list','action')}&id={$value.id}">
			<div class="img"><img src="{$value.ico ? $value.ico : 'images/ico/default.png'}" /></div>
			<div class="txt" id="txt_{$value.id}">{$value.nick_title ? $value.nick_title : $value.title}</div>
		</div>
	</li>
	<!-- /loop -->
</ul>
<div class="clear"></div>
<!-- /if -->

<div class="tips">
	您当前的位置：
	<a href="{echo admin_url('list')}">内容管理</a>
	<!-- if $pid -->
		<!-- loop from=$plist key=$key value=$value id=plist_id -->
		&raquo; <a href="{echo admin_url('list','action')}&id={$value.id}" title="{$value.title}">{$value.title}</a>		
		<!-- /loop -->
	<!-- /if -->
	&raquo; 编辑页面属性
</div>

<!-- if $rs.admin_note --><div class="tips">{$rs.admin_note}</div><!-- /if -->

<ul class="group">
	<li class="on" onclick="$.admin.group(this)" name="main">基本设置</li>
	<li onclick="$.admin.group(this)" name="seo">SEO优化</li>
</ul>

<form method="post" id="{$ext_module}" action="{echo admin_url('list','save')}" onsubmit="return project_check();">
<input type="hidden" id="id" name="id" value="{$id}" />
<div id="main_setting">
	<div class="table">
		<div class="title">
			名称：
			<span class="note">设置名称</span>
		</div>
		<div class="content"><input type="text" id="title" name="title" class="long" value="{$rs.title}" /></div>
	</div>
	<!-- loop from=$extlist key=$key value=$value -->
	<div class="table">
		<div class="title">
			<table cellspacing="0" cellpadding="0">
			<tr>
				<td height="25">{$value.title}<span class="darkblue">[{$value.identifier}]</span>：</td>
				<td><span class="note">{$value.note}</span></td>
			</tr>
			</table>
		</div>
		<div class="content">{$value.html}</div>
	</div>
	<!-- /loop -->
</div>
<div id="seo_setting" class="hide">
	<div class="table">
		<div class="title">
			SEO标题：
			<span class="note">设置此标题后，网站Title将会替代默认定义的，不能超过85个汉字</span>
		</div>
		<div class="content">
			<input type="text" id="seo_title" name="seo_title" class="long" value="{$rs.seo_title}" />
		</div>
	</div>
	<div class="table">
		<div class="title">
			SEO关键字：
			<span class="note">多个关键字用英文逗号或英文竖线隔开</span>
		</div>
		<div class="content">
			<input type="text" id="seo_keywords" name="seo_keywords" class="long" value="{$rs.seo_keywords}" />
		</div>
	</div>
	<div class="table">
		<div class="title">
			SEO描述：
			<span class="note">简单描述该主题信息，用于搜索引挈，不支持HTML，不能超过85个汉字</span>
		</div>
		<div class="content">
			<textarea name="seo_desc" id="seo_desc" class="long">{$rs.seo_desc}</textarea>
		</div>
	</div>
	<div class="table">
		<div class="title">
			Tag标签：
			<span class="note">多个标签用英文空格隔开，最多不能超过10个词</span>
		</div>
		<div class="content">
			<input type="text" id="tag" name="tag" class="long" value="{$rs.tag}" />
		</div>
	</div>
</div>

<div class="table">
	<div class="content">
		<br />
		<input type="submit" value="提 交" class="submit" />
		<br />
	</div>
</div>
</form>


<!-- inc:foot -->